--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 4424d34474816095d2617fb35059b54e4d60e372
Parents : 5b1332c
Author : Sudo-Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-01-16T12:38:39-06:00
Add Wine environment setup script
- Introduced a new script to automate the setup of a Wine prefix with Python and Git for Windows.
- The script downloads the specified versions of Python and Git, initializes the Wine environment, and installs necessary build dependencies.
- Enhances the build process for Windows cross-builds by streamlining the installation of required tools.
Changes
Diff
diff --git a/scripts/setup_wine_env.sh b/scripts/setup_wine_env.sh
new file mode 100755
index 00000000..8ce1e103
--- /dev/null
+++ b/scripts/setup_wine_env.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+set -e
+
+# Wine Environment Setup Script
+# This script prepares a Wine prefix with Python and Git for Windows
+
+export WINEDEBUG=-all
+export WINEARCH=win64
+export WINEPREFIX=${WINEPREFIX:-$HOME/.wine}
+
+PYTHON_VERSION="3.13.1"
+PYTHON_EXE="python-${PYTHON_VERSION}-amd64.exe"
+PYTHON_URL="https://www.python.org/ftp/python/${PYTHON_VERSION}/${PYTHON_EXE}"
+
+GIT_VERSION="2.52.0"
+GIT_EXE="Git-${GIT_VERSION}-64-bit.exe"
+GIT_URL="https://github.com/git-for-windows/git/releases/download/v${GIT_VERSION}.windows.1/${GIT_EXE}"
+
+echo "Downloading Windows Python and Git..."
+wget -q "$PYTHON_URL"
+wget -q "$GIT_URL"
+
+chmod +x *.exe
+
+echo "Initializing Wine prefix in $WINEPREFIX..."
+xvfb-run wine wineboot --init
+
+echo "Installing Python $PYTHON_VERSION into Wine..."
+xvfb-run wine "./$PYTHON_EXE" /quiet InstallAllUsers=1 TargetDir=C:\\Python313 PrependPath=1
+
+echo "Installing Git into Wine..."
+xvfb-run wine "./$GIT_EXE" /VERYSILENT /NORESTART
+
+echo "Installing build dependencies in Wine Python..."
+xvfb-run wine C:/Python313/python.exe -m pip install --upgrade pip
+xvfb-run wine C:/Python313/python.exe -m pip install cx_Freeze poetry
+if [ -f "requirements.txt" ]; then
+ xvfb-run wine C:/Python313/python.exe -m pip install -r requirements.txt
+fi
+
+# Clean up installers
+rm "$PYTHON_EXE" "$GIT_EXE"
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────